alist=[2,3,4,546,76,12,34,6,67,51]
for i in range(len(alist)-1):
    for j in range(len(alist)-1-i):
        if alist[j]>alist[j+1]:
            alist[j],alist[j+1]=alist[j+1],alist[j]
print(alist)